
import request from "@/utils/request.js";

export default {
	'getAccountApi': 'member/getAccount',
	'getUserApi': 'member/getUser',
	'userByIdApi': 'member/getUserById',
	'updateHeadImgApi': 'member/updateHeadImg',
	'updateInfo': 'member/updateInfo',
	'viewGoodsListApi': 'member/viewGoods/getList',//足迹列表
	'clearViewGoodsApi': 'member/viewGoods/clear',//清空足迹
	'delViewGoodsApi': 'member/viewGoods/delete',//删除足迹
	'commentListApi': 'member/comment/getList',//获取评价列表
	'commentApi': 'member/comment/comment',//评价
	'addCommentApi': 'member/comment/continuteAdd',//发表追评

	'bankListApi': 'member/bank/getList',//获取银行卡列表
	'bankConfigApi': 'common/getBankSelector',//获取银行卡配置
	'bindBankApi': 'member/bank/bind',//绑定银行卡
	'delBankApi': 'member/bank/delete',//删除银行卡

	'cancelRechargeApi': 'member/recharge/cancel',//取消充值
	'withdrawApi': 'member/withdraw/apply',//申请提现
	
	'accountListApi': 'member/account/getList',//资金明细
	'poinListApi': 'member/point/getList',//积分明细
	'bzjListApi': 'member/bzj/getList',//积分明细
	
	'chatListApi': 'member/chatSession/getList',//会话列表
	'delChatApi': 'member/chatSession/delete',//删除聊天会话
	'chatNumApi': 'member/chat/countUnReadNum',//统计总未读数量
	'chatNumTargetIdApi': 'member/chat/countUnReadNumTargetId',//统计总未读数量
	'readChatApi': 'member/chat/read',//当前会话置为已读
	'wuliuChatApi': 'member/news/getList',//交易物流消息列表
	'readNewsApi': 'member/news/readAll',//全部置为已读
	'newsNumApi': 'member/news/countNews',//统计未读消息数量
	'getKefuIdApi': 'common/chat/getCustomerId',//获取人工客服和智能客服的ID
	'getOrderNum': 'member/center/count',//获取用户订单数字统计
	'delHistory': 'member/viewGoods/delete',//删除足迹
	'clearHistory': 'member/viewGoods/clear',//清空足迹
	'likeFindList': 'member/trends/getMyCollectionList',//我关注的动态列表
	'centerOrderList': 'member/order/getRolliingList',//个人中心订单

	'rechargeApi': 'member/recharge/online',//在线充值
	'rechargeListApi': 'member/recharge/getList',//充值列表
	
	'creditslogs': 'member/recharge/getList',//会员钱包变动日志
	
	
	
	'redbagSendApi': 'member/redbag/send',//发送红包、充值
	'memberPayApi': 'member/pay',//支付订单
	'updateLngLat': 'member/updateLngLat',
}

// 创建发票
export function invoiceSave(data) {
	return request.post('user/receipt/add', data);
}
// 编辑发票
export function invoiceUpdate(id, data) {
	return request.post('user/receipt/update/' + id, data);
}
// 获取默认发票
export function invoiceDefault(id) {
	return request.post('user/receipt/is_default/' + id);
}
// 发票抬头--列表
export function invoice(data) {
	return request.get('user/receipt/list', data);
}
// 发票抬头--删除
export function invoiceDelete(id) {
	return request.delete('user/receipt/del/' + id);
}
// 发票--详情
export function invoiceDetail(id) {
	return request.get('user/receipt/detail/' + id);
}


/**
 * 发票订单
 * @param object data
*/
export function receiptOrder(data){
  return request.get('user/receipt/order/list',data);
}
/**
 * 发票订单
 * @param object data
*/
export function getReceiptOrder(id){
  return request.get('user/receipt/order/'+id);
}
/**
 * 发票订单
 * @param object data
*/
export function getCallBackUrlApi(key){
  return request.get('common/pay_key/'+key, {},{ noAuth : true});
}

/**
 * 发票订单
 * @param object data
*/
export function develiveryDetail(id){
  return request.get(`order/delivery/${id}`);
}
